<?php if(!defined('A')) exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站内容管理系统</title>
<?php
loadcss(array('reset','shell'));

//loadcss(array('colorbox'),P_CSS);
loadjs(array('jquery'),P_JS);

loadjs(array('tab','util','table'));

?>
<script type="text/javascript">
$(document).ready(function(e) {
var smallNowTab;
var pt = new Tabs();
pt.classpre="smalltab_";
pt.container = "smalltab_container";
pt.createTab("t1","help","",true,"n");
pt.init = function(){
	smallNowTab = pt.nowTab;
};
pt.onclick = function(){
	smallNowTab = pt.nowTab;
};		
pt.initTab();
pt.clickNowTab();    
});

$(document).ready(function(){ 
	
});





</script>
<style>
body{margin:10px;}
</style>
</head>
<body>
<table class="settop">
<tr>
<td class="settop_left">
&nbsp;&nbsp;
</td>
<td>
<div id="smalltab_container"></div>
</td>
</tr>
</table>
<div class="smalltab_line"></div>
<div id="t1">
<br />
<br />
<?php
ob_start();
?>
<form action="" method="post" id="myform">
<?php
if(!empty($fields)){
?>
<table width="90%" border="0" cellspacing="0" cellpadding="0" class="mytable">
<?php
foreach($fields as $k=>$v){
?>
  <tr>
    <td align="right">
<?php
if(in_array($v,$notnull)){
?>
		<span class="red"><?php echo $names[$v]?$names[$v]:$v;?>：</span>
<?php
}else{
?>
		<?php echo $names[$v]?$names[$v]:$v;?>：
<?php
}
?>
    </td>
    <td align="left">
<?php
switch($types[$v]){
	case 'text':
?>
		<input type="text" name="<?php echo $v?>" id="<?php echo $v?>" class="input" value="" />
<?php
	break;
	case 'textarea':
?>
		<textarea name="<?php echo $v;?>" id="<?php echo $v;?>" cols="50" rows="4"></textarea>
<?php
	break;
	case '':
?>
		<?php echo $diys[$v];?>
<?php
	break;
}
?>
<?php
if($lengths[$v]){
?>
		<span class="green">(最长<?php echo $lengths[$v];?>个字符)</span>
<?php
	}
?>
	</td>
  </tr>
<?php
}
?>

</table>
<?php
}
?>
</form>
<?php
$contents=ob_get_contents();
ob_end_clean();
echo $contents;
?>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mytable">
  <tr>
    <td align="center">
<embed width="62" height="24" align="center"
flashvars="txt=<?php echo htmlspecialchars($contents,ENT_QUOTES);?>"
src="<?php echo PROJECT_SWF_URL;?>copy.swf"
quality="high" wmode="transparent"
allowscriptaccess="sameDomain"
pluginspage="http://www.adobe.com/go/getflashplayer"
type="application/x-shockwave-flash">
    </td>
  </tr>
  <tr>
    <td align="center"><textarea name="" id="" cols="100" rows="5"><?php echo htmlspecialchars($contents,ENT_QUOTES);?></textarea></td>
  </tr>
</table>

</body>
</html>